
test5to3(
'var letters = ["a", "b"];\n\
for each (var i in letters)\n\
	print(i);',

'var letters, i, a;\n\
letters = [ "a", "b" ];\n\
for (a in letters) {\n\
	i = letters[a];\n\
	print(i);\n\
}'
);

test5to3(
'for each (var i in {}) e()',

'var i, a, b;\n\
for (a in b = {}) {\n\
	i = b[a];\n\
	e();\n\
}'
);

// when accessing properties of unknown objects, getters may be involved so it must only be accessed once
test5to3(
'for each (var i in x.y) e()',

'var i, a, b;\n\
for (a in b = x.y) {\n\
	i = b[a];\n\
	e();\n\
}'
);

test5to3(
'for each (var i in a = {}) e()',

'var i, b;\n\
for (b in a = {}) {\n\
	i = a[b];\n\
	e();\n\
}'
);

test5to3(
'for each (var i in a.b = {}) e()',

'var i, b, c;\n\
for (b in c = a.b = {}) {\n\
	i = c[b];\n\
	e();\n\
}'
);
